{extend name="default/base/base_seller" /}
{block name="seller_main"}
 <div class="alert alert-block mt10">
            <ul class="mt5">
                <li>{$Think.lang.shopping_guidelines1}</li>
                <li>{$Think.lang.shopping_guidelines2}</li>
                <li>{$Think.lang.shopping_guidelines3}</li>
            </ul>
        </div>
        <form method="get" action="" target="_self">
            <table class="search-form">
                <input type="hidden" name="state" value="{$Request.param.state}" />
                <tr>
                    <td></td>
                    <th>{$Think.lang.store_order_add_time}</th>
                    <td class="w240"><input type="text" class="text w70" name="query_start_date" id="query_start_date" value="{$Request.param.query_start_date}" /><label class="add-on"><i class="iconfont">&#xe8d6;</i></label>
                        &nbsp;&#8211;&nbsp;
                        <input id="query_end_date" class="text w70" type="text" name="query_end_date" value="{$Request.param.query_end_date}" /><label class="add-on"><i class="iconfont">&#xe8d6;</i></label></td>
                    <th>{$Think.lang.store_order_buyer}</span></th>
                    <td class="w100"><input type="text" class="text w80" name="buyer_name" value="{$Request.param.buyer_name}" /></td>
                    <th>{$Think.lang.store_order_order_sn}</th>
                    <td class="w160"><input type="text" class="text w150" name="order_sn" value="{$Request.param.order_sn}" /></td>
                    <td class="w70 tc">
                        <input type="submit" class="submit"value="{$Think.lang.store_order_search}" />
                    </td>
                </tr>
            </table>
        </form>
        <table class="dssc-default-table order deliver">
            <tbody>
                {notempty name="order_list"}
                {foreach name="order_list" item="order" key="order_id" }
                <tr>
                    <td colspan="21" class="sep-row"></td>
                </tr>
                <tr>
                    <th colspan="21"><span class="ml5">{$Think.lang.store_order_order_sn}{$Think.lang.ds_colon}<strong>{$order.order_sn}</strong></span><span>{$Think.lang.store_order_add_time}{$Think.lang.ds_colon}<em class="goods-time">{$order.add_time|date="Y-m-d H:i:s"}</em></span>
                        {if !empty($order['extend_order_common']['shipping_time'])}
                        <span>{$Think.lang.member_show_order_send_time}{$Think.lang.ds_colon}<em class="goods-time">{$order['extend_order_common']['shipping_time']|date="Y-m-d H:i:s"}</em></span>
                        {/if}
                        <span class="fr mr10">
                            {if $order.shipping_code != ''}
                            <a href="{:url('Sellerdeliver/search_deliver',['order_sn'=>$order.order_sn])}" class="dssc-btn-mini"><i class="iconfont">&#xe720;</i>{$Think.lang.store_order_show_deliver}</a>
                            {/if}
                            <a href="{:url('Sellerorder/print_order',['order_id'=>$order.order_id])}" target="_blank"  class="dssc-btn-mini" title="{$Think.lang.store_show_order_printorder}"/><i class="iconfont">&#xe7ca;</i>{$Think.lang.store_show_order_printorder}</a>
                        </span>
                    </th>
                </tr>
                {php}$i = 0;{/php}
                {foreach name="$order.goods_list" item="goods" key="k" }
                {php}$i++;{/php}
                <tr>
                    <td class="bdl w10"></td>
                    <td class="w50"><div class="pic-thumb"><a href="{$goods.goods_url}" target="_blank"><img src="{:goods_thumb($goods, 240)}" /></a></div></td>
                    <td class="tl"><dl class="goods-name">
                            <dt><a target="_blank" href="{$goods.goods_url}">{$goods.goods_name}</a></dt>
                            <dd><strong>￥{$goods.goods_price}</strong>&nbsp;x&nbsp;<em>{$goods.goods_num}</em>{$Think.lang.piece}</dd>
                        </dl></td>

                    <!-- S 合并TD -->
                    {if ($order['goods_count'] > 1 && $k == 0) || ($order['goods_count'] == 1)}
                    <td class="bdl bdr order-info w500" rowspan="{$order.goods_count}"><dl>
                            <dt>{$Think.lang.store_deliver_buyer_name}{$Think.lang.ds_colon}</dt>
                            <dd>{$order.buyer_name} <span member_id="{$order.buyer_id}"></span>
                                {if !empty($order['extend_member']['member_qq'])}
                                <a target="_blank" href="{$Think.HTTP_TYPE}wpa.qq.com/msgrd?v=3&uin={$order['extend_member']['member_qq']}&site=qq&menu=yes" ><img border="0" src="{$Think.HTTP_TYPE}wpa.qq.com/pa?p=2:{$order['extend_member']['member_qq']}:52" style=" vertical-align: middle;"/></a>
                                {/if}
                                {if !empty($order['extend_member']['member_ww'])}
                                <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid={$order['extend_member']['member_ww']}&site=cntaobao&s=2&charset=utf-8" class="vm" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid={$order['extend_member']['member_ww']}&site=cntaobao&s=2&charset=utf-8" alt="Wang Wang" style=" vertical-align: middle;"/></a>
                                {/if}
                            </dd>
                        </dl>
                        <dl>
                            <dt>{$Think.lang.member_address_receiver_name}{$Think.lang.ds_colon}</dt>
                            <dd>
                                <div class="alert alert-info m0">
                                    <p><i class="iconfont">&#xe69b;</i>{$order['extend_order_common']['reciver_name']}<span class="ml30" title="{$Think.lang.store_order_phone}"><i class="iconfont">&#xe697;</i>{$order['extend_order_common']['reciver_info']['phone']}</span></p>
                                    <p class="mt5" title="{$Think.lang.store_deliver_buyer_address}"><i class="iconfont">&#xe720;</i>{$order['extend_order_common']['reciver_info']['address']}</p>
                                    {if $order['extend_order_common']['order_message'] != ''}
                                    <p class="mt5" title="{$Think.lang.store_deliver_buyer_address}"><i class="iconfont">&#xe720;</i>{$order['extend_order_common']['order_message']}</p>
                                    {/if}
                                </div>
                            </dd>
                        </dl>
                        <dl>
                            <dt>{$Think.lang.store_deliver_shipping_amount}{$Think.lang.ds_colon} </dt>
                            <dd>
                                {if !empty($order['shipping_fee']) && $order['shipping_fee'] != '0.00'}
                                ￥{$order.shipping_fee}
                                {else/}
                                {$Think.lang.ds_common_shipping_free}
                                {/if}
                                {if empty($order['lock_state'])}
                                {if $order['order_state'] == ORDER_STATE_PAY}
                                
                                {if !isset($order.pintuanorder_state) || $order.pintuanorder_state==2}
                                <span><a href="{:url('Sellerdeliver/send',['order_id'=>$order.order_id])}" class="dssc-btn-mini dssc-btn-green fr"><i class="iconfont">&#xe6f1;</i>{$Think.lang.store_order_send}</a></span>
                                {else /}
                                <span>{$order.pintuanorder_state_text}</span>
                                {/if}
                                
                                
                                {elseif $order['order_state'] == ORDER_STATE_SEND /}
                                <span>
                                    <a href="javascript:void(0)" class="dssc-btn-mini dssc-btn-orange ml5 fr" uri="{:url('Sellerdeliver/delay_receive',['order_id'=>$order.order_id])}" dialog_width="480" dialog_title="{$Think.lang.delay_receiving}" ds_type="dialog" dialog_id="seller_order_delay_receive" id="order{$order.order_id}_action_delay_receive" /><i class="iconfont">&#xe736;</i></i>{$Think.lang.delay_receiving}</a>
                                    <a href="{:url('Sellerdeliver/send',['order_id'=>$order.order_id])}" class="dssc-btn-mini dssc-btn-acidblue fr"><i class="iconfont">&#xe731;</i>{$Think.lang.store_deliver_modify_info}</a>
                                </span>
                                {/if}
                                {/if}
                            </dd>
                        </dl>
                    </td>
                    {/if}
                    <!-- E 合并TD -->
                </tr>

                <!-- S 赠品列表 -->
                {if !empty($order['zengpin_list']) && $i == count($order['goods_list'])}
                <tr>
                    <td class="bdl w10"></td>
                    <td colspan="2" class="tl">
                        <div class="dssc-goods-gift">{$Think.lang.store_deliver_gifts}：
                            <ul>
                                {foreach name="$order.zengpin_list" item="zengpin_info" key="k" }
                                <li><a title="{$Think.lang.store_deliver_gifts}：{$zengpin_info.goods_name} * {$zengpin_info.goods_num}" href="{$zengpin_info.goods_url}" target="_blank"><img src="{:goods_thumb($zengpin_info,240)}"/></a></li>
                                {/foreach}
                            </ul>
                        </div>
                    </td>
                </tr>
                {/if}
                <!-- E 赠品列表 -->
                
                {/foreach}
                {/foreach}
                {else/}
                <tr>
                    <td colspan="21" class="norecord"><div class="warning-option"><i class="iconfont">&#xe64c;</i><span>{$Think.lang.no_record}</span></div></td>
                </tr>
                {/notempty}
            </tbody>
            <tfoot>
                {notempty name="order_list"}
                <tr>
                    <td colspan="21"><div class="pagination"></div></td>
                </tr>
                {/notempty}
            </tfoot>
        </table>
        {$show_page|raw}
        <script type="text/javascript">
                        $(function(){
                        $('#query_start_date').datepicker({dateFormat: 'yy-mm-dd'});
                                $('#query_end_date').datepicker({dateFormat: 'yy-mm-dd'});
                                });
        </script> 


{/block}
